
import HTTP from '../util/http.js';

export default class BookModel extends HTTP {
    //热门书籍
    getHotList(){
        return this.request({
            url: '/book/hot_list'
        });
    }
    //书籍详情
    getBookDetail(bid){
        return this.request({
            url: `/book/${bid}/detail`
        });
    }
    //书籍短评
    getShortComment(bid){
        return this.request({
            url: `/book/${bid}/short_comment`
        });
    }
    //书籍点赞信息
    getBookFavor(bid){
        return this.request({
            url: `/book/${bid}/favor`
        });
    }
    //新增短评
    addShortComment(bid, comment){
        return this.request({
            url: '/book/add/short_comment',
            method: 'post',
            data: {
                book_id: bid,
                content: comment
            }
        });
    }
}


















